package io.renren.service.impl;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import io.renren.common.service.impl.CrudServiceImpl;
import io.renren.dao.MarketDao;
import io.renren.dto.MarketDTO;
import io.renren.entity.MarketEntity;
import io.renren.service.MarketService;
import org.apache.commons.lang3.StringUtils;
import org.springframework.stereotype.Service;

import java.util.Map;

/**
 * 市场监管
 *
 * @author 罗胜平 781757616@qq.com
 * @since 1.0.0 2019-11-22
 */
@Service
public class MarketServiceImpl extends CrudServiceImpl<MarketDao, MarketEntity, MarketDTO> implements MarketService {

    @Override
    public QueryWrapper<MarketEntity> getWrapper(Map<String, Object> params){
        String id = (String)params.get("id");

        QueryWrapper<MarketEntity> wrapper = new QueryWrapper<>();
        wrapper.eq(StringUtils.isNotBlank(id), "id", id);

        return wrapper;
    }


}